2 research outputs found

    Event Loops as First-Class Values: A Case Study in Pedagogic Language Design

    Full text link
    The World model is an existing functional input-output mechanism for event-driven programming. It is used in numerous popular textbooks and curricular settings. The World model conflates two different tasks -- the definition of an event processor and its execution -- into one. This conflation imposes a significant (even unacceptable) burden on student users in several educational settings where we have tried to use it, e.g., for teaching physics. While it was tempting to pile on features to address these issues, we instead used the Scheme language design dictum of removing weaknesses that made them seem necessary. By separating the two tasks above, we arrived at a slightly different primitive, the reactor, as our basis. This only defines the event processor, and a variety of execution operators dictate how it runs. The new design enables programmatic control over event-driven programs. This simplifies reflecting on program behavior, and eliminates many unnecessary curricular dependencies imposed by the old design. This work has been implemented in the Pyret programming language. The separation of concerns has enabled new curricula, such as the Bootstrap:Physics curriculum, to take flight. Thousands of students use this new mechanism every year. We believe that reducing impedance mismatches improves their educational experience

    Productivity Tools for Solver-Aided Programming

    No full text
    Thesis (Ph.D.)--University of Washington, 2023Solver-aided programming has been employed for many automated reasoning tasks, such as program verification and program synthesis. Despite its success, making solver-aided programs is still difficult, time-consuming, and error-prone.Prior work developed productivity tools to help with these issues by relying on language abstraction. Yet, there is still a need for more productivity tools, due to the language's complex semantics, which is foreign to most programmers. This dissertation aims to show that recontextualization and extensibility are keys to developing productivity tools for solver-aided programming. Recontextualization makes solver-aided programming more familiar to programmers, and extensibility allows programmers to specify domain-specific knowledge to control the tools. These guiding principles are identified from existing productivity tools and our three new contributions to improve productivity in different stages of solver-aided programming. First, our work on formal foundation for symbolic evaluation presents a class of reusable symbolic evaluators that simplify programming to interact with solvers. Second, our work on profile-guided symbolic optimizer introduces a tool for scaling up solver-aided programs. Third, our work on expressive pretty printer provides a practical approach to interface solver-aided programs with end users. Our contributions along with existing tools support the thesis, giving an insight into the design of future productivity tools for solver-aided programming
    corecore